/**
 * @author        Nicolas Bottarini <nicolasbottarini@gmail.com>, 404 <http://www.proyecto404.com>
 * @version       $Rev: 3 $
 * @lastrevision  $Date: 2011-09-12 16:45:37 +0000 (Mon, 12 Sep 2011) $	 
 */
package com.proyecto404.core.mvc {
	import com.proyecto404.core.BaseObject;
	import com.proyecto404.core.exception.AbstractMethodException;
	
	import flash.display.DisplayObjectContainer;

	public class PopupManager extends BaseObject{
		private var _contentLayer:DisplayObjectContainer;
		private var _popupLayer:DisplayObjectContainer;
		protected var _currentPopup:View;
		
		public function PopupManager(contentLayer:DisplayObjectContainer, popupLayer:DisplayObjectContainer) {
			_contentLayer = contentLayer;
			_popupLayer = popupLayer;
		}
		
		protected function get contentLayer():DisplayObjectContainer {
			return _contentLayer;
		} 
		
		protected function get popupLayer():DisplayObjectContainer {
			return _popupLayer;
		} 

		public function get currentPopup():View {
			return _currentPopup;
		}
		
		/**
		 * @abstract
		 */
		public function showPopup(popupView:View, onClose:Function = null):void { throw new AbstractMethodException(); }
		
		/**
		 * @abstract
		 */
		public function closePopup(onClose:Function = null):void { throw new AbstractMethodException(); }
	}
}